home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / TECHNICA / COMPUTER / H124.ZIP / DISK2.ZIP / KD_DOC.5_9 < prev    next >
Text File  |  1990-07-18  |  60KB  |  2,010 lines

  1.  
  2.  
  3.  
  4.  
  5.      ──────────────────────────────────────────
  6.  
  7.      5 - DRAWING EXAMPLES
  8.      ──────────────────────────────────────────
  9.  
  10.      Start out using the program by experiment-
  11.      ing. Try using the various  functions  and
  12.      actions  and  noting  the  results. With a
  13.      little time and practice, using  the  pro-
  14.      gram  becomes very fast and efficient. For
  15.      major works, take time  to  plan  out  the
  16.      order  in  which you will create the draw-
  17.      ing. It is generally best  to  start  with
  18.      the details, shrink these down and combine
  19.      them to produce the final drawing.
  20.  
  21.      If you want the printed  drawing  to  look
  22.      like  the screen, the reverse video action
  23.      should be chosen  from  <F1>  just  before
  24.      printing.   This  is  useful  for  showing
  25.      things like  planetoids,  paintings,  etc,
  26.      because the black background is more natu-
  27.      ral. Mechanical drawings should be printed
  28.      out  without  reversing the screen so that
  29.      they correspond to the standard method  of
  30.      viewing, black print on white.
  31.  
  32.       [GIRLNC]            [GIRLRC]
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.      Figure  5-1  shows  GIRL.SCN in normal and
  43.      reverse video. In this  case  the  reverse
  44.      video  should  be used before printing for
  45.      the best results.
  46.  
  47.  
  48.                            DRAWING EXAMPLES 5-1
  49.  
  50.  
  51.  
  52.  
  53.  
  54.   Since  many  of  the  actions  take  place
  55.   inside of boxed areas it is  advisable  to
  56.   create  parts  of a drawing separately and
  57.   then combine them at the end. This can  be
  58.   accomplished by drawing the various compo-
  59.   nents on different parts of the screen  or
  60.   by  using  a screen for each component and
  61.   combining screens using the copy action of
  62.   <F7>.  Alternately,  layers can be used to
  63.   keep portions of the drawing separate.
  64.  
  65.   The following contains a number of  simple
  66.   examples  to  help  get  you  started. The
  67.   examples are written  out  in  long  form.
  68.   Elsewhere  in this manual the examples are
  69.   provided in a MaCRo file form.
  70.  
  71.   To draw box: Move the cursor to one of the
  72.   corners  of  the box. Select desired color
  73.   of  box  with  <F10>.  Select   <F2>   and
  74.   <r>ectangle  to  display  the box as it is
  75.   drawn. Move the cursor to form the box  as
  76.   desired.  Use  the  <Shft-Cursor>  keys to
  77.   adjust the  start  point  of  the  box  if
  78.   needed.   Hit  either  <F2>,  <ENTER>,  or
  79.   <F1-F8> to complete function and draw box.
  80.   Respond <y> to the "Correct (y/n)?" prompt
  81.   to keep the box or <n> to  return  to  the
  82.   drawing as it was.
  83.  
  84.   To  draw  a circle: Move the cursor to the
  85.   desired  center  of  the  circle.   Select
  86.   desired  color  of  the  circle  with  F8.
  87.   Select <F3> and <c> for circle.  Move  the
  88.   cursor  to  the  desired  radius  and  hit
  89.   either  <F3>,  <ENTER>,  or   <F1-F8>   to
  90.   complete  function and draw circle. If the
  91.   circle is  not  properly  centered  simply
  92.   hold  down the <Shift> key while using the
  93.   cursor keys. Respond  as  desired  to  the
  94.   "Correct (y/n)?" prompt.
  95.  
  96.  
  97.   DRAWING EXAMPLES 5-2
  98.  
  99.  
  100.  
  101.  
  102.  
  103.      To  draw  a  line:  Move the cursor to the
  104.      start of the line. Select  <F6>  and  <l>.
  105.      Move  cursor  to position line as desired.
  106.      Use a <ENTER> or <F1-F8> <l> to mark  next
  107.      point  on line. Continue drawing lines. To
  108.      stop momentarily use the <Space  Bar>.  If
  109.      you make an error, <Back Space> can be use
  110.      to erase the last line and  redraw  up  to
  111.      where  you are. Line width can also be set
  112.      using the <w>idth command  of  the  CURSOR
  113.      MODE and changed at will while drawing the
  114.      line. The color can be varied as the  line
  115.      is drawn and you can switch back and forth
  116.      with <d>ot, <p>arallel line, and  <s>poked
  117.      line.  When  last  point  of line has been
  118.      marked, select <F6> and either <e> or  <E>
  119.      to end the line. If <E> is chosen the line
  120.      is not only drawn on the screen, but saved
  121.      to  disk under user specified name. It can
  122.      be retrieved at any angle  and  any  scale
  123.      using <F6 o>. Even if you did not save the
  124.      drawing to disk, it is still available for
  125.      reuse,   continuation   or   modification.
  126.      Select <F6 O> to redraw the last vector.
  127.  
  128.      Built in Objects: PC-KEY-DRAW  contains  a
  129.      number  of objects built into the program.
  130.      Figure 5-2 shows a number of the built  in
  131.      objects,  including  rectangle, circle and
  132.      line.  The  objects  can  be  combined  to
  133.      create  more  complex  images  or modified
  134.      with the commands  like  <F1  Ctrl-s>lide,
  135.      <m>irror,  <f>lip and more. Objects can be
  136.      created with <F6 l> and stored  as  vector
  137.      images to disk.
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.                            DRAWING EXAMPLES 5-3
  147.  
  148.  
  149.  
  150.  
  151.  
  152.   [primitiv]
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.   Figure 5-2. Object primitives;  from  <F2>
  170.   <r>-rectangle,  <p 3>-polygon with 3 sides
  171.   (triangle), <p  4>-polygon  with  4  sides
  172.   (square), <p 5>-polygon with 5 sides (pen-
  173.   tagon), <p 6>-polygon with 6 sides  (hexa-
  174.   gon), and <p 7>-polygon with 7 sides (hep-
  175.   tagon); from <F3> <c>-circle, <e>-ellipse,
  176.   <a>-arc,   <A>-pie   shape  arc,  <r>-rose
  177.   curve, <t>-trig (sine curve),  <s>-spiral,
  178.   and  <b>-b-spline  curve;  and  from  <F6>
  179.   <l>-line and  <s>-spoke.  Figure  5-2  was
  180.   created  in  the high resolution mode. The
  181.   prompt line shows that "parallel line"  is
  182.   about to be selected.
  183.  
  184.  
  185.   To  erase  an  area:  Move the cursor to a
  186.   position at one of the corners of the area
  187.   to  be  erased.  Select <F7 e> to mark the
  188.   corner. Move the  cursor  to  enclose  the
  189.   desired area with the display box. As with
  190.   box the <Shft-cursor> keys can be used  to
  191.   modify the initial corner position. Select
  192.   <ENTER> or <F1-F8> to  mark  the  opposite
  193.   corner. Copy works the same way.
  194.  
  195.   DRAWING EXAMPLES 5-4
  196.  
  197.  
  198.  
  199.  
  200.  
  201.      [planet]
  202.                       Creating    3-D   looking
  203.                       spheres or planetoids  is
  204.                       easy   using   the  spray
  205.                       paint  feature  of  <F4>.
  206.                       Start by drawing a circle
  207.                       of  desired  size,   next
  208.                       paint  it  with  <F5>  as
  209.                       desired. Move the  cursor
  210.                       to  a location on the now
  211.                       painted circle and select
  212.      <F4 s> to spray paint one of the colors in
  213.      the circle or if you prefer use <F4 Alt-s>
  214.      to  spray  paint  all  foreground  colors.
  215.      Next move the cursor to one corner of  the
  216.      square  containing  the  circle and select
  217.      <ENTER> to mark that corner. Next  enclose
  218.      the  circle  in a box by moving the cursor
  219.      and select <ENTER> a third time  to  begin
  220.      spray  painting.  Figure  5-3 shows what a
  221.      simple planetoid might look like. This  is
  222.      a fun operation to use with the key macro,
  223.      since by varying the cursor  speed  before
  224.      calling  the macro a different size plane-
  225.      toid will result.
  226.  
  227.      Very complex and interesting patterns  can
  228.      be  created  by  copying and area and then
  229.      moving off the screen with  <F7  a>nimate.
  230.      Try  this with the file KD-PTRN.PIC, which
  231.      can be retrieved with <F7 o>ld.  When  you
  232.      obtain  a  particular  pattern you want to
  233.      use leave it on the screen with <F7 M> and
  234.      then  copy  it  again.  Next move over the
  235.      object you wish to  paint  with  this  new
  236.      color pattern. Select <F7 Ctrl-m> to paint
  237.      the object. (Note the object should be  in
  238.      color 3 for best results.)
  239.  
  240.  
  241.  
  242.  
  243.  
  244.                            DRAWING EXAMPLES 5-5
  245.  
  246.  
  247.  
  248.  
  249.  
  250.   [3dbox]
  251.                    3-D oblique drawings  can
  252.                    be  made quickly from 2-D
  253.                    drawings. In high resolu-
  254.                    tion, draw a box with <F2
  255.                    r>; copy the box with <F7
  256.                    c>;  set the cursor speed
  257.                    to 1; move one  space  to
  258.                    the  left  and  one space
  259.                    up; select <F7  s>;  move
  260.                    alternately one step left
  261.   and one step up until cube is  of  desired
  262.   size;  select <F7 M>; and the cube is com-
  263.   plete. Figure 5-4 shows just such a cube.
  264.  
  265.   Schematics and flow charts can be  readily
  266.   created  from predefined symbol libraries.
  267.   Creating your own symbol libraries is easy
  268.   and straight forward. For objects that you
  269.   want to bring in at  different  sizes  and
  270.   angles  the features of <F6> are ideal. As
  271.   an illustration,  lets  consider  creating
  272.   symbols  of furniture to use in laying out
  273.   an office. Start by setting the  scale  of
  274.   the  screen  so  that  the  furniture will
  275.   nearly fill the screen when drawn  to  get
  276.   the  maximum  resolution. Move to 0,0 with
  277.   <Alt-1>, select <F6 l, d, p, s>  to  start
  278.   drawing  the item. When you have completed
  279.   drawing the item select <F6 E> to end line
  280.   drawing  save  the  vector  image to disk.
  281.   Give the item an appropriate name  and  go
  282.   to  the next item. When you are working on
  283.   the  room  layout  simply  call   up   the
  284.   required  object  from  disk using <F6 o>,
  285.   rotate it if desired, and place  it  where
  286.   you  want.  See  Figures 5-5 and 5-6 for a
  287.   sample hydraulic schematic.
  288.  
  289.  
  290.  
  291.  
  292.  
  293.   DRAWING EXAMPLES 5-6
  294.  
  295.  
  296.  
  297.  
  298.  
  299.      [hydro]
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.      Figure 5-5 Schematic Sample
  317.  
  318.  
  319.          [fluid2]
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.      Figure 5-6 Schematic Sample
  333.  
  334.  
  335.      Special effects can be created by  setting
  336.      the   background  attribute  to  something
  337.      other  then  the  actual  background.  Try
  338.      setting  the  background  with <B> to <1>.
  339.      Now draw a box or circle or line. Note how
  340.      the  object is left behind as you move the
  341.  
  342.                            DRAWING EXAMPLES 5-7
  343.  
  344.  
  345.  
  346.  
  347.  
  348.   cursor.  When  you hit the <ENTER> key the
  349.   screen is refreshed  and  then  the  final
  350.   box/circle/line  is  drawn,  but sometimes
  351.   it is desirable to use <B> to create  pat-
  352.   terns  and other effects much quicker than
  353.   otherwise possible. At any time  you  wish
  354.   to  preserve what the screen shows, select
  355.   <k>eep and it will be saved.
  356.  
  357.   16 Colors: If you have a  composite  color
  358.   monitor  or  TV set you can obtain sixteen
  359.   colors instead of the normal  4  available
  360.   in  RGB. Set the color palette to the sec-
  361.   ond palette  where  color  1=Green,  color
  362.   2=Red  and  color  3=Yellow.  Draw several
  363.   boxes, circles, or polygons on the screen.
  364.   Move  the cursor to within one of the fig-
  365.   ures and select <F5  Alt-p>aint.  A  color
  366.   bar  will  appear showing 16 color choice,
  367.   but these won't look that great. Select  a
  368.   </>  and the colors change to 16 distinct,
  369.   vibrant colors  on  a  composite  monitor.
  370.   Select  the  number you desire and specify
  371.   the color of the figure and the object  is
  372.   painted.  Most  of the other drawing func-
  373.   tions only recognize the four primary col-
  374.   ors so some care must be taken when creat-
  375.   ing a composite picture.
  376.  
  377.   Macros included with PC-KEY-DRAW can be an
  378.   ideal  method  of  learning how to use the
  379.   program. By watching the  macros  you  can
  380.   get  a feel for what can be done. By read-
  381.   ing the macro  files  you  can  learn  the
  382.   exact  key  strokes  required  to create a
  383.   given effect. See the following section on
  384.   editing  macros  for more information. Try
  385.   entering the key strokes as they  are  and
  386.   see  what  happens.  Note that some macros
  387.   start with a lot of initialization,  while
  388.   others get right down to drawing.
  389.  
  390.  
  391.   DRAWING EXAMPLES 5-8
  392.  
  393.  
  394.  
  395.  
  396.  
  397.      Several  things can be done to slow macros
  398.      down so that what  is  happening  is  more
  399.      visible.  Try  turning on the Help menu by
  400.      setting the program to Novice mode in  the
  401.      <Ctrl-s>tatus  Screen.  Remove  the *|2 or
  402.      *|1 line in the macro so that  the  cursor
  403.      and  prompt  are  shown  when the macro is
  404.      run. This makes it run a lot  slower.  You
  405.      can even add <Alt-p>ause commands at vari-
  406.      ous places in a macro so that it stops for
  407.      awhile before proceeding.
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.                            DRAWING EXAMPLES 5-9
  441.  
  442.  
  443.  
  444.  
  445.  
  446.      ──────────────────────────────────────────
  447.  
  448.      6 - KEY MACRO
  449.      ──────────────────────────────────────────
  450.  
  451.      Perhaps one of the most powerful functions
  452.      of  PC-KEY-DRAW  is the key macro command,
  453.      because it has so many different  uses.  I
  454.      have  yet to fully explore all of the uses
  455.      of the key macro, but they include  saving
  456.      entire  drawings,  creating  slide  shows,
  457.      saving commonly used routines/figures, and
  458.      performing  repetitive operations. The key
  459.      macro command works by  recording  all  of
  460.      the  key  strokes you make and saving them
  461.      to disk in a sequential  ASCII  file.  The
  462.      program  keeps track of the same key being
  463.      hit a multiple number of times and records
  464.      not  only the key, but its repetition num-
  465.      ber. Key macro files  can  be  very  small
  466.      and still do quite a lot.
  467.  
  468.      Saving  Entire  Drawings: PC-KEY-DRAW pro-
  469.      vides numerous ways  to  save  a  drawing,
  470.      which  way you use depends on a variety of
  471.      factors. The key macro  offers  a  way  to
  472.      save  a  drawing  that is rather different
  473.      from the rest, because, instead of  saving
  474.      a  completed  drawing,  you are saving the
  475.      steps to create that drawing. When the key
  476.      macro  is used to save a drawing it should
  477.      start by properly  initializing  the  pro-
  478.      gram,  so  that each time it is called the
  479.      result will be the same.  After  selecting
  480.      create macro with <Alt-k c> and naming it,
  481.      initialize  the  program.   Initialization
  482.      should  start  with  refreshing the screen
  483.      with <F8 f>, setting  the  cursor  to  0,0
  484.      with  <Alt-1>, setting the cursor speed to
  485.      one with <Shft-F9>, and setting the  color
  486.      to  1  with  <Shft-F10>.  Then  proceed to
  487.      create the drawing. When  the  drawing  is
  488.  
  489.                                   KEY MACRO 6-1
  490.  
  491.  
  492.  
  493.  
  494.  
  495.   complete, end the key  macro  with  <Alt-k
  496.   e>.  The  drawing can then be redrawn with
  497.   <Alt-k r> and the  macro  name.  IRIS2.MCR
  498.   (on  Library  Disk  #2)  is  an  excellent
  499.   example  of  saving  an  entire   drawing.
  500.   IRIS2.MCR  must  be  drawn from the medium
  501.   resolution  mode  and  started  with  both
  502.   SCreen 1 and SCreen 2 clear.
  503.  
  504.   Slide  Shows: Very interesting slide shows
  505.   can be created quickly  and  easily  using
  506.   the  key macro command. The complete draw-
  507.   ing capability is available to be used  in
  508.   the  slide  show.  Slide shows are created
  509.   simply by starting the macro and then per-
  510.   forming  the  desired steps. This might be
  511.   as  simple  as  calling  up  a  series  of
  512.   already  completed drawings and pausing in
  513.   between them or  may  include  the  actual
  514.   creation  of  the  drawing  as part of the
  515.   show. The DEMO.BAT (formally SAMPLE) macro
  516.   included   on  the  program  diskette  was
  517.   created simply by drawing what was wanted.
  518.   As  with  the  saving  of a drawing, slide
  519.   shows  should  be  initialized  for   best
  520.   results.  Portions  of a slide show can be
  521.   done separately and then combined by link-
  522.   ing  or  merging.  Linking is performed by
  523.   calling the next sequence from the end  of
  524.   the  first. In this way slide shows can be
  525.   very long or continuous. Merging is accom-
  526.   plished  using  a word processor and actu-
  527.   ally combining files. See  Editing  Macros
  528.   for more information.
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.   KEY MACRO 6-2
  539.  
  540.  
  541.  
  542.  
  543.  
  544.      The <*> (star) command is useful for slide
  545.      shows and you may want to  include  it  as
  546.      part  of  the initialization. Normally the
  547.      prompts for the program will be  displayed
  548.      as  a  macro is run, but by using a single
  549.      <*> at the beginning of  the  command  all
  550.      printed  prompts  can  be suppressed. This
  551.      not only improves the  appearance  of  the
  552.      slide  show,  but  it  greatly  speeds the
  553.      execution time. Entering  <*>  twice  will
  554.      stop printing of prompts and will hide the
  555.      cursor. From a text editor put the follow-
  556.      ing line in to stop the prompts:
  557.  
  558.          *|1
  559.  
  560.      or  use  the following to stop the prompts
  561.      and hide the cursor:
  562.  
  563.          *|2
  564.  
  565.      or to hide  the  prompts,  cursor,  object
  566.      capture  lines,  and  most  cursor related
  567.      actions, such as circle, arc, and  rectan-
  568.      gle rubberbanding until sizing is complete
  569.      use:
  570.  
  571.          *|3
  572.  
  573.      or to hide  the  prompts,  cursor,  object
  574.      capture lines, and all cursor line rubber-
  575.      banding use:
  576.  
  577.          *|4
  578.  
  579.      Future versions may use higher  valves  of
  580.      <*> for various special effects.
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.                                   KEY MACRO 6-3
  588.  
  589.  
  590.  
  591.  
  592.  
  593.   Star commands take effect immediately  and
  594.   absolutely.  Generally the first line of a
  595.   macro is a star command. A  star  command,
  596.   once  started, remains in effect until the
  597.   macro ends or until another  star  command
  598.   takes  effect.  Star commands are provided
  599.   as a means to speed up macro execution and
  600.   hide some of the behind scenes action from
  601.   the viewer. To display all activity during
  602.   a macro use:
  603.  
  604.       *|0
  605.  
  606.   Note  that  with  *|3 and *|4 some special
  607.   effects are lost, in particular those that
  608.   use  <B>ackground to leave behind color as
  609.   the cursor is moved will  not  behave  the
  610.   same if the cursor drawing is turned off.
  611.  
  612.   Saving   Commonly  Used  Routines/Figures:
  613.   Certain operations can be saved for  later
  614.   use  in another drawing. These saved oper-
  615.   ations can be called from disk  as  needed
  616.   to  perform  the  required  task, and save
  617.   having to manually do the task. Generally,
  618.   routines  should  include minimal initial-
  619.   ization for the maximum flexibility. Vari-
  620.   ous  figures  that  are  commonly used can
  621.   also be saved with the key macro  command,
  622.   as  they  will  probably require less disk
  623.   space then if saved with one of the  other
  624.   methods.  The  penalty for doing so is the
  625.   time required to create the figure on  the
  626.   screen  will  be longer than that required
  627.   to simply call the completed drawing  from
  628.   disk.  However, for saving border patterns
  629.   and the like, the  key  macro  command  is
  630.   ideal.
  631.  
  632.  
  633.  
  634.  
  635.  
  636.   KEY MACRO 6-4
  637.  
  638.  
  639.  
  640.  
  641.  
  642.      Repetitive  Operations:  Key macros can be
  643.      used  to   automate   certain   repetitive
  644.      actions  and save you significant time. An
  645.      example of such is the creating of concen-
  646.      tric  circles or ellipses using all of the
  647.      available colors. Try the following:
  648.      1. Locate the cursor in the screen center.
  649.      2. Set the cursor speed to 1 and the color
  650.         to one.
  651.      3.  Start  the  key  macro  with  the name
  652.         CIRCLE.
  653.      4. Draw a circle of radius one pixel.
  654.      5. End the circle and confirm that  it  is
  655.         correct.
  656.      6.  Move  the  cursor to the center of the
  657.         circle using <C>.
  658.      7. Step the cursor speed up one using  the
  659.         <+> key.
  660.      8.  Step  the color up one using the <F10>
  661.         key.
  662.      9. Select <Alt-k> and run the macro CIRCLE
  663.         from itself.
  664.  
  665.      At  this  point  the  program should start
  666.      drawing circle  after  circle,  each  time
  667.      incrementing  the  color  and  the size by
  668.      one. To stop the macro use <Esc>. Try some
  669.      other  short  drawings and linking them to
  670.      themselves.
  671.  
  672.      Configuration: While PC-KEY-DRAW  provides
  673.      a Configuration Screen, it does not remem-
  674.      ber everything that you  may  want  it  to
  675.      remember  the  next  time you run the pro-
  676.      gram. A simple solution is to create a key
  677.      macro that does the desired configuration,
  678.      such as adjusting the screen. Version  3.1
  679.      or  later  allow  macros to be called from
  680.      DOS when the program is called, by  simply
  681.      entering the name of the macro on the com-
  682.      mand line after the program name, followed
  683.      by a space.
  684.  
  685.                                   KEY MACRO 6-5
  686.  
  687.  
  688.  
  689.  
  690.  
  691.   Editing  Macros:  The  editing  of  macros
  692.   created from version 3 is limited to using
  693.   a word processor.  The  file  is  straight
  694.   ASCII,  but beware that what may look like
  695.   a common space  CHR$(32)  is  actually  an
  696.   ASCII  zero CHR$(0). Also beware that cur-
  697.   sor position is  relative,  not  absolute.
  698.   The  use  of  a background editor, such as
  699.   Sidekick, can be of great  benefit,  since
  700.   it  can be called up while you are working
  701.   in PC-KEY-DRAW. Be sure that the  particu-
  702.   lar background program you are using works
  703.   when the screen is in a graphics mode!
  704.  
  705.   The macro files are set up  so  that  each
  706.   line  is a command followed by a separator
  707.   (|) and the  number  of  repetitions.  The
  708.   command  is  the  actual  key stroke code.
  709.   While MaCRo files can be  edited  directly
  710.   it is easier to first convert them to TeXT
  711.   files using KD-TRANS.EXE.
  712.  
  713.   Since errors you may make are recorded you
  714.   may want to edit them out of a slide show.
  715.   This can be done easily to the ASCII  file
  716.   by  removing only the commands and not the
  717.   cursor movement that may occur as part  of
  718.   the command.
  719.  
  720.   One of the most common editing method will
  721.   be the merging of files together to create
  722.   one big file. When merging files care must
  723.   be taken to ensure that all parameters are
  724.   set  to  the  value  needed by consecutive
  725.   parts of the macro. For example the cursor
  726.   position  at  the  start  of  a macro will
  727.   determine the actual end result.
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.   KEY MACRO 6-6
  735.  
  736.  
  737.  
  738.  
  739.  
  740.      One handy feature of a key  macro  is  the
  741.      ability  to call a second macro at the end
  742.      of the first, allowing unlimited macros to
  743.      be  chained  together  when  run,  but  to
  744.      reside separately on disk. To avoid having
  745.      to edit the macro, work in reverse, start-
  746.      ing with the last  section  first  and  be
  747.      sure that each macro includes its own ini-
  748.      tialization.
  749.  
  750.      Macro files contain the key strokes  used,
  751.      followed  by  a separator (|) and a number
  752.      to indicate the number of  times  the  key
  753.      was hit in a row. If the key was a command
  754.      it will only appear once  while  something
  755.      like  a  cursor movement key may have been
  756.      hit many times in a row. Text can be added
  757.      after the repeat number for the purpose of
  758.      placing remarks in a macro. This is  espe-
  759.      cially  convenient  for including notes to
  760.      others on what the macro does and  how  to
  761.      use  it.  The following is a short example
  762.      of what a macro file would look like after
  763.      being  translated  with  KD-TRANS.EXE to a
  764.      TeXT file:
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.                                   KEY MACRO 6-7
  784.  
  785.  
  786.  
  787.  
  788.  
  789.   SHFT-F10  |1     Force Color to Color 1
  790.   SHFT-F9   |1     Force Cursor Speed to 1
  791.   +         |4     Add 4 to the Cursor Speed
  792.   F2        |1     Select Function 2
  793.   p         |1     Select polygon
  794.   5         |1     5 sided
  795.   RIGHT     |9     Move right 9 times
  796.   [         |3     Rotate the polygon
  797.   F9        |1     Drop speed to 1
  798.   [         |1     Rotate the polygon
  799.   ENTER     |2     End and indicate correct.
  800.   F9        |1     Toggle speed back to 5
  801.   LEFT      |5     Move into polygon
  802.   F5        |1     Select F5 Paint & Pattern
  803.   ALT-P     |1     Select Alternate paint
  804.   8         |1     Choose Color 8 for fill
  805.   1         |1     Choose Color 1 for border
  806.   ENTER     |1     Confirm correct.
  807.   ALT-K     |1     Select Key Macro
  808.   e         |1     End
  809.  
  810.   You  can  duplicate  the  above  by simply
  811.   entering in the above keys the  number  of
  812.   times  indicated. The remarks to the right
  813.   of  the  repeat  number  should   not   be
  814.   entered.  Note  that  KD-TRANS expects the
  815.   key stroke name to be exactly  10  charac-
  816.   ters and spaces.
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.   KEY MACRO 6-8
  833.  
  834.  
  835.  
  836.  
  837.  
  838.      DOS  and Macros: Macros can be called from
  839.      DOS as follows:
  840.  
  841.          KD-DRAW FILENAME
  842.  
  843.      where FILENAME is the name  of  the  macro
  844.      file  to be called once KD-DRAW is loaded.
  845.      A MCR extension  is  assumed.  If  another
  846.      extension  is used it must be specified or
  847.      the file will not be found. This  capabil-
  848.      ity  allows the slide shows to be run by a
  849.      user knowing nothing about PC-KEY-DRAW  or
  850.      allows  set-up  routines to be run to cus-
  851.      tomize  PC-KEY-DRAW  to  your   particular
  852.      application.
  853.  
  854.      Macros  can  be called from BATch files or
  855.      macros can be DOS BATch files. It is  pos-
  856.      sible  to  create  a  macro that is both a
  857.      BATch file and a PC-KEY-DRAW  macro.  This
  858.      allows  for  lots  of possibilities with a
  859.      minimum of extra files on the  disk.  Some
  860.      care  must  be  taken  in setting up BATch
  861.      file and MaCRo file combinations. Use  the
  862.      samples  on  the  program disk as a guide.
  863.      Basically the BATch file is the first part
  864.      and  the MaCRo the second. Since no action
  865.      is taken in a macro file until the separa-
  866.      tor  (|)  is  located  the  BATch  file is
  867.      ignored by the macro.
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.                                   KEY MACRO 6-9
  882.  
  883.  
  884.  
  885.  
  886.  
  887.   Run  Time Mode: Starting with version 3.24
  888.   PC-KEY-DRAW can be set to work  in  a  Run
  889.   Time  Mode,  so that the end user can view
  890.   and run macros without  any  knowledge  of
  891.   PC-KEY-DRAW.  To turn PC-KEY-DRAW into the
  892.   run time mode simply remove or rename  KD-
  893.   DRAW.HLP.  When  KD-DRAW  is called, if it
  894.   does not find KD-DRAW.HLP, it only  allows
  895.   a  macro  to  be  run. In normal operation
  896.   when a macro is exited  by  <Esc>,  normal
  897.   end  of  the  macro,  or  an error control
  898.   returns to the CURSOR MODE. In a run  time
  899.   mode  when  the  macro  is  exited control
  900.   returns to  DOS.  If  KD-DRAW.DFT  is  not
  901.   found the default drive is assumed to con-
  902.   tain everything required by the  macro  to
  903.   run unless a drive is specified in calling
  904.   the desired  macro,  in  which  case  that
  905.   drive  is assumed to contained the primary
  906.   files needed by the macro.  There  are  no
  907.   restrictions  to  distributing PC-KEY-DRAW
  908.   as a Run Time  program,  ie.  without  KD-
  909.   DRAW.HLP,  except if a charge for the disk
  910.   is made. If you wish to charge for  a  Run
  911.   Time  version of PC-KEY-DRAW you must have
  912.   prior written permission.
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.   KEY MACRO 6-10
  931.  
  932.  
  933.  
  934.  
  935.  
  936.      Hot Keys: 27 keys can be assigned a  macro
  937.      file  name  so that when the key is struck
  938.      the appropriate macro file is run  immedi-
  939.      ately. The Hot keys are the following:
  940.  
  941.            <Shft-F1 to F8>
  942.            <Ctrl-F1 to F10>
  943.            <Alt-F1 to F9>
  944.  
  945.      If  KD-DRAW.HOT  is  found  on the program
  946.      disk or in the program  directory  on  the
  947.      hard  disk the Hot keys are activated. KD-
  948.      DRAW.HOT contains the listing of  the  key
  949.      macro  files that correspond to the appro-
  950.      priate function keys. KD-DRAW.HOT  can  be
  951.      edited  with any text editor that produces
  952.      pure ASCII files.
  953.  
  954.      There are two primary applications for Hot
  955.      keys. The first is to assign commonly used
  956.      routines so that they  can  be  called  up
  957.      quickly  as  needed. A number of such rou-
  958.      tines are supplied on library disk #2  and
  959.      #3.  For  example  BOLD.MCR  produces bold
  960.      faced text from any text brought  in  with
  961.      <F6  Ctrl-t> or <F6 Alt-t>. The second use
  962.      of the Hot keys is for creating a tutorial
  963.      using  the function keys with an on screen
  964.      menu.
  965.  
  966.      The default HOT key file  is  KD-DRAW.HOT,
  967.      but  HOT  key  files can have any name and
  968.      any number of HOT key files can reside  on
  969.      a  disk, up to the limit of disk space. To
  970.      change to a different HOT key  use  <Alt-k
  971.      f>unction  to  specify the name of the HOT
  972.      key file.
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.                                  KEY MACRO 6-11
  980.  
  981.  
  982.  
  983.  
  984.  
  985.   MAKe  HOT LIBrary: HOT key files can be in
  986.   two forms, raw and compiled. A raw HOT key
  987.   file  consists of the names of MaCRo files
  988.   next to the associated key strokes  as  in
  989.   Figure 6-1.
  990.  
  991.        [hotraw]
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.   Figure 6-1 Sample HOT key file header with
  1003.   direct call of MaCRo files.
  1004.  
  1005.  
  1006.   When a defined  HOT  key  is  pressed  the
  1007.   appropriate  MaCRo  file is run from disk.
  1008.   While this method  of  HOT  key  operation
  1009.   works  fine,  it  can  be very wasteful of
  1010.   disk space since each MaCRo is a  separate
  1011.   file.  MAKHOTLIB.EXE allows you to compile
  1012.   or library a HOT key file so that  all  of
  1013.   the MaCRo files become part of the HOT key
  1014.   file. The first time MAKHOTLIB is run from
  1015.   DOS  it  creates a blank HOT key file that
  1016.   can be edited with  a  word  processor  or
  1017.   text  editor. If MAKHOTLIB is run when KD-
  1018.   DRAW.HOT already exists  it  will  combine
  1019.   the  KD-DRAW.HOT with the MaCRo files into
  1020.   one file. The header of the HOT  key  file
  1021.   is  changed  slightly  to reflect that the
  1022.   macros are located in the HOT key file and
  1023.   not  in a separate file. Figure 6-2 is the
  1024.   same HOT key file header after being  com-
  1025.   piled with MAKHOTLIB.EXE.
  1026.  
  1027.  
  1028.   KEY MACRO 6-12
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.           [hotcomp]
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.      Figure  6-2  Sample HOT key file header in
  1046.      compiled form.
  1047.  
  1048.  
  1049.      The ">" symbol is the GOTO command in  PC-
  1050.      KEY-DRAW.  It  is  used  to tell the macro
  1051.      read routine to jump to the  corresponding
  1052.      label in the file. A label in this case is
  1053.      the file  name  preceded  with  ":".  This
  1054.      would  be  all that is needed to operate a
  1055.      HOT key, but in a large file searching for
  1056.      the  appropriate label can be rather slow.
  1057.      The number following the macro  file  name
  1058.      is  the  location  of the beginning of the
  1059.      appropriate macro in  the  file,  allowing
  1060.      the macro read routine to jump directly to
  1061.      the appropriate place in the HOT key  file
  1062.      to  begin  the  macro  execution. The GOTO
  1063.      symbol (>) and the file offset  value  are
  1064.      added by MAKHOTLIB.EXE when it is run.
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.                                  KEY MACRO 6-13
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.   Supplied Macros: Numerous macros are  sup-
  1084.   plied  with PC-KEY-DRAW. Some are for dem-
  1085.   onstration  of  the  programs  capability,
  1086.   some  are  more entertaining then anything
  1087.   else, while others  perform  various  rou-
  1088.   tines that are of use to a serious PC-KEY-
  1089.   DRAW user. The following discusses several
  1090.   of  the  more  significant macros. Most of
  1091.   the supplied macros have remarks that  can
  1092.   be  read  using  a  text  editor or simply
  1093.   TYPEd from DOS to  show  instructions  for
  1094.   the  macro.  Use  <Alt-1>  <F6  T  a> from
  1095.   PC-KEY-DRAW  to  read  the  macro  remarks
  1096.   before  running it. Be sure to answer <n>o
  1097.   when asked if correct  or  the  text  will
  1098.   become  part of your drawing. It is a good
  1099.   idea to add remarks to any macros that you
  1100.   write.  In  particular  you should provide
  1101.   information as to any premacro  operations
  1102.   that  are  needed for successful operation
  1103.   of the macro. Remarks can be added with  a
  1104.   text editor.
  1105.  
  1106.   Sample  Demo: A sample demo is included on
  1107.   the program disk. It was created  in  sev-
  1108.   eral  sections  and  then edited together.
  1109.   Note that the prompt line has been  turned
  1110.   off  for  most  of  the demo for a cleaner
  1111.   look and faster execution. DEMO.BAT  (for-
  1112.   mally  SAMPLE.MCR)  may  stop  at  several
  1113.   points and wait for input  from  the  key-
  1114.   board  before  continuing. A short line is
  1115.   displayed in the bottom right corner  when
  1116.   the  macro  is waiting for user input. The
  1117.   <Alt-p> command could also  be  used  when
  1118.   you  want  the  macro to suspend operation
  1119.   for a specified length of  time.  DEMO.BAT
  1120.   is both the Batch file and the macro.
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.   KEY MACRO 6-14
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.      Slide  Show  Demo:  A  demo  slide show is
  1133.      included with  the  numerous  screens  and
  1134.      pictures  on  Library Disk #1. SCNSHOW.MCR
  1135.      is a macro that calls  previously  created
  1136.      screens  and partial screens using a vari-
  1137.      ety of display techniques. This method  of
  1138.      operation  is  similar to other Slide Show
  1139.      programs, but far more powerful.
  1140.  
  1141.            [iris]
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.      Figure   6-3   IRIS3.SCN   created    with
  1154.      IRIS2.MCR, Brenda Kidera.
  1155.  
  1156.  
  1157.      Drawing Demo: Library Disk #2 contains the
  1158.      macro IRIS2.MCR that creates a drawing  of
  1159.      an  iris  from  scratch. You can watch the
  1160.      moves that the artist  made  to  construct
  1161.      the  drawing. Mistakes and changes of mind
  1162.      have been left  in  to  show  the  process
  1163.      behind  the picture. The completed picture
  1164.      is contained in IRIS3.SCN. My wife  Brenda
  1165.      drew  this picture. She is an artist which
  1166.      becomes very clear seeing the  results  of
  1167.      IRIS2.MCR.  IRIS2  took 4 hours from start
  1168.      to finish to create, edit the  macro,  and
  1169.      eat  dinner.  IRIS2.MCR must be started in
  1170.      medium resolution mode for proper results.
  1171.  
  1172.  
  1173.  
  1174.  
  1175.                                  KEY MACRO 6-15
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.   Routines: Library Disk #2 contains several
  1182.   useful routines. Two of  the  most  useful
  1183.   are  OVERLAY.MCR  and  OVERLAY2.MCR.  Both
  1184.   take an object  currently  being  animated
  1185.   and  through a series of steps overlay the
  1186.   object onto the background. Which one  you
  1187.   use  depends  on  the object that is to be
  1188.   overlaid. OVERLAY will leave a  dark  out-
  1189.   line  around the object which is ideal for
  1190.   many, but not all objects.  OVERLAY2  does
  1191.   not  leave  the  outline  and is therefore
  1192.   better for certain  objects.  Both  macros
  1193.   were  written  to make use of SCreen 2 and
  1194.   SCreen F7 as workspaces,  so  anything  in
  1195.   these screens when you call the macro will
  1196.   be lost. It would be easy to write a macro
  1197.   that  does  not use SCreen 2, but uses the
  1198.   disk for temporary storage instead.
  1199.  
  1200.   A number of text  oriented  routines  have
  1201.   been  compiled and included in KD-DRAW.HOT
  1202.   on the program disk.   It  is  recommended
  1203.   that the header for KD-DRAW.HOT be printed
  1204.   out and used as a reference during program
  1205.   operation.  For  more  information  on the
  1206.   individual routines see the  corresponding
  1207.   files  on  library  disks  #2, #3, and #4.
  1208.   Many the macros have instructions  in  the
  1209.   form of remark statements in the macro.
  1210.  
  1211.   Create  your  own routines and add them to
  1212.   KD-DRAW.HOT or create another HOT key file
  1213.   for the routines that you commonly use.
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.   KEY MACRO 6-16
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.      ──────────────────────────────────────────
  1231.  
  1232.      7 - PAGES AND LAYERS
  1233.      ──────────────────────────────────────────
  1234.  
  1235.      PC-KEY-DRAW   version  3  allows  you  the
  1236.      option to draw using up to 64 pages or  64
  1237.      layers. The two cannot be used at the same
  1238.      time. Pages and layers are  saved  on  the
  1239.      workspace  disk, which can either be a RAM
  1240.      disk, hard disk, or floppy. In a page mode
  1241.      a  drawing  2560  pixels by 1600 pixels is
  1242.      possible in the  medium  resolution  mode.
  1243.      To  use all 64 pages/layers about 1.2 megs
  1244.      of memory is required. In addition, to use
  1245.      more  than  about 20 pages/layers you must
  1246.      set up a subdirectory for  the  workspace.
  1247.      See  your  DOS  manual  for information on
  1248.      creating   and    using    subdirectories.
  1249.  
  1250.          [work1]
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.      Figure  7-1  PC-KEY-DRAW  in  SCreen 1 and
  1264.      PaGe 00.
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.                              PAGES & LAYERS 7-1
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.   Screens:  There are four screens available
  1280.   for creating drawings. Generally you  will
  1281.   use SCreen 1 or SCreen 2 as the main draw-
  1282.   ing screen. You must be  in  SCreen  1  to
  1283.   access the pages. The other main screen is
  1284.   generally used as a temporary workspace or
  1285.   for holding symbols, shapes, patterns that
  1286.   you need to access quickly and repeatedly.
  1287.   If  you  are using layers SCreen 2 becomes
  1288.   the visual  layer  and  SCreen  1  is  the
  1289.   active  layer.  Figure 7-1 shows a picture
  1290.   being worked on while in SCreen 1 PaGe 00.
  1291.  
  1292.   SCreen 3 is called F7 and  it  shows  that
  1293.   last object copied, erased, animated, etc.
  1294.   Most of the drawing functions can be  used
  1295.   in  F7,  although  some may behave differ-
  1296.   ently. F7 is an ideal  screen  to  use  to
  1297.   modify  something  that  was  just  copied
  1298.   before placing  it  on  the  drawing.  For
  1299.   example  to  change  the  color  of a FONT
  1300.   before placing  it  on  one  of  the  main
  1301.   screens.  <F8  o>ld,  <F8 O>ld sequential,
  1302.   and <F8 s>ave work differently  in  SCreen
  1303.   F7.  Instead  of manipulating full screens
  1304.   the partial  screens  normally  associated
  1305.   with  the  F7  key are retrieved or saved.
  1306.   This makes <F8  O>ld  sequential  particu-
  1307.   larly  useful  since  it  lets  you browse
  1308.   through the partial screens  as  you  nor-
  1309.   mally would with the full screens.
  1310.  
  1311.   The  final screen is very limited and con-
  1312.   tains the 25th line of the main screens.
  1313.  
  1314.   Screens are different from pages  in  sev-
  1315.   eral  important ways, but perhaps the most
  1316.   significant  is  where  they  are  stored.
  1317.   Screens  are  stored  within  the 192K the
  1318.   program uses, while pages, other then  the
  1319.   current  page, are stored on the workspace
  1320.   disk. For fast access use a RAM disk.
  1321.  
  1322.   PAGES & LAYERS 7-2
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.      Pages can be used when you want to  create
  1329.      a  picture that is larger than can be rea-
  1330.      sonably accommodated on a  single  screen.
  1331.      This might be a large flow chart, mechani-
  1332.      cal drawing, or just a big painting. Basi-
  1333.      cally  the  pages  are  arranged on an 8X8
  1334.      grid although they can be used as 64  ver-
  1335.      tical  pages if desired. It is possible to
  1336.      scroll by 1/2 page either horizontally  or
  1337.      vertically.  To  use  pages you must be in
  1338.      SCreen  1.  Portions  of  a  page  can  be
  1339.      readily  transferred  between  other pages
  1340.      using the <F7 c>opy function.  Pages  must
  1341.      be saved separately to disk. While in page
  1342.      mode the cursor line will  show  SC1  PG00
  1343.      when in SCreen 1 & PaGe 00.
  1344.  
  1345.      To  scroll  from  one  page to another use
  1346.      <Ctrl-Home> to  display  current  position
  1347.      and  then  use  the  arrow  cursor keys to
  1348.      scroll/pan in the direction of  the  arrow
  1349.      by  one  half screen. Use <PgUp> or <PgDn>
  1350.      to move a full  page  at  a  time.  <Home>
  1351.      returns you to PaGe 00 and <End> takes you
  1352.      to the maximum page that has been created.
  1353.      When scrolling the current screen is saved
  1354.      to the workspace  disk,  if  anything  has
  1355.      been  added,  and the disk is searched for
  1356.      the existence of the page you  are  moving
  1357.      to.  If the page was previously created it
  1358.      is shown, otherwise a blank page is shown.
  1359.      Selecting  <Ctrl-Home> twice displays PaGe
  1360.      00 without saving the page  you  are  cur-
  1361.      rently on. This is how multiple pages pre-
  1362.      viously created are restored.
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.                              PAGES & LAYERS 7-3
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.   Version 3.50 has added the ability to show
  1378.   a map of the  pages  by  selecting  <Ctrl-
  1379.   Home>  followed  by  <?>,  <h>, or <H> for
  1380.   help. With the map  displayed  the  cursor
  1381.   will  move the active screen window around
  1382.   on  the  virtual  page  until  <ENTER>  is
  1383.   selected  to select the desired portion of
  1384.   the page to work on. Figure 7-2 shows  how
  1385.   the map looks while working in medium res-
  1386.   olution.
  1387.  
  1388.       [pagemap]
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.   Figure 7-2 PAGE map of pages. The  current
  1402.   active  page  is PaGe 11.  Use cursor keys
  1403.   to  move  around  and  then  select   with
  1404.   <ENTER>.
  1405.  
  1406.  
  1407.   The ability to use multiple screens allows
  1408.   some very detailed printed output on laser
  1409.   printers.  Consider  drawing  on just four
  1410.   pages then printing them out side by  side
  1411.   on a laser printer for a 1280X800 dot res-
  1412.   olution picture from a  standard  graphics
  1413.   card.
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.   PAGES & LAYERS 7-4
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.      Layers  or  overlays are very powerful and
  1427.      useful. Think of them as drawing  on  sev-
  1428.      eral  layers  of  clear  plastic. Only the
  1429.      active layer is effected  by  the  various
  1430.      functions.  The other layers can be visual
  1431.      as desired. To use layers you must  be  in
  1432.      SCreen  1,  as  it  is  the active screen.
  1433.      SCreen 2 becomes  the  visual  screen  and
  1434.      holds   copies  of  all  layers  that  are
  1435.      visual.  To  use  correctly,  start   with
  1436.      SCreen  2 being clear. Draw the first por-
  1437.      tion of the graphic on SCreen 1  and  then
  1438.      declare a layer with <Ctrl-l>. This trans-
  1439.      fers SCreen 1 to SCreen  2,  saves  it  to
  1440.      disk  and  clears  SCreen 1. With SCreen 2
  1441.      now being overlaid with SCreen 1 the draw-
  1442.      ing will initially look the same. Continue
  1443.      drawing and  as  appropriate  declare  the
  1444.      next  layer and so on. There are many uses
  1445.      of layers and many ways that they  can  be
  1446.      used.  Proper  use  of  layers can greatly
  1447.      speed the creation of complex drawings. As
  1448.      with  pages, if you want to save the vari-
  1449.      ous layers you must do so separately. When
  1450.      layers  are activated the prompt line will
  1451.      show SC1L0* when in SCreen 1 and Layer  0.
  1452.      The  *  indicates that not only are layers
  1453.      active, but that the visual layer is  cur-
  1454.      rently  being  shown along with the active
  1455.      layer. If the prompt line reads  SC1L3  it
  1456.      means  that  you  are in SCreen 1, Layer 3
  1457.      and only the active layer is being shown.
  1458.  
  1459.      A simpler way of using the  layer  feature
  1460.      is to load a pattern screen into SCreen 2.
  1461.      For example a screen  containing  perspec-
  1462.      tive lines might be put in SCreen 2 as the
  1463.      visual layer. Switch to SCreen 1 and acti-
  1464.      vate  layer  with an <l>, causing the per-
  1465.      spective screen to be shown aiding in cre-
  1466.      ation of a perspective drawing.
  1467.  
  1468.  
  1469.                              PAGES & LAYERS 7-5
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.   Another use for layers is to load  a  com-
  1476.   plex  object  as  the visual layer and use
  1477.   the active layer to trace the visual layer
  1478.   and save it in a vector format.
  1479.  
  1480.   Saving  Pages/Layers:  As noted the layers
  1481.   and pages must be  saved  separately  from
  1482.   within the program. An alternate method of
  1483.   saving layers/pages  can  be  accomplished
  1484.   from  DOS.  After  completing  the various
  1485.   pages exit the  program  to  DOS.  If  the
  1486.   workspace  drive  is the same as the drive
  1487.   you save drawings on, then use the follow-
  1488.   ing command in DOS, after switching to the
  1489.   workspace drive:
  1490.  
  1491.       REN PAGE.* FILE.*
  1492.  
  1493.   where FILE is the name that you  want  the
  1494.   file  to  have.  To  recall  the file at a
  1495.   later date you must  first  rename  it  as
  1496.   follows:
  1497.  
  1498.       REN FILE.* PAGE.*
  1499.  
  1500.   Run  the  program  and  select <Ctrl-Home>
  1501.   twice to restore the first page.
  1502.  
  1503.   If you use a RAM disk for a workspace then
  1504.   a  slightly  different procedure is needed
  1505.   to save the drawings from DOS. Instead  of
  1506.   RENaming   the  files  COPY  them  to  the
  1507.   desired disk (X:) as follows:
  1508.  
  1509.       COPY PAGE.* X:FILE.*
  1510.  
  1511.   And to retrieve the files use:
  1512.  
  1513.       COPY X:FILE.* PAGE.*
  1514.  
  1515.   Enter the program and retrieve  the  files
  1516.   using <Ctrl-Home> twice.
  1517.  
  1518.   PAGES & LAYERS 7-6
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.      Compressed  Saves:  A  modification of the
  1525.      above technique can be used  to  not  only
  1526.      save  the pages or layers, but to compress
  1527.      them and combine them into a single  file.
  1528.      Several  programs  are  available  such as
  1529.      ARC, LUE/LUU, and PKARC that can  compress
  1530.      and  library  files.  At  the time of this
  1531.      writing PKARC may be the best  all  around
  1532.      choice   for  archiving  your  files.  The
  1533.      graphics screens can be significantly com-
  1534.      pressed  and  by  combining  them into one
  1535.      file they can more easily  be  kept  track
  1536.      of. Which library program you use is up to
  1537.      you, but a faster one has  some  advantage
  1538.      over an more efficient one. By writing the
  1539.      appropriate macro-batch  file  combination
  1540.      the  entire  operation  can be operated to
  1541.      the point where the user has little knowl-
  1542.      edge of what actually takes place.
  1543.  
  1544.  
  1545.                      !REMEMBER!
  1546.  
  1547.      <F8  s>ave  will  save only the screen you
  1548.      are in and not the pages and layers. Refer
  1549.      to the previous discussion for information
  1550.      on how to save pages and layers.  KD-LASER
  1551.      will use the PAGE.* files to print from.
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.                              PAGES & LAYERS 7-7
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.      ──────────────────────────────────────────
  1574.  
  1575.      8 - LIBRARIES
  1576.      ──────────────────────────────────────────
  1577.  
  1578.      PC-KEY-DRAW provides 6 methods  of  saving
  1579.      libraries   of   commonly  used  pictures,
  1580.      screens, fonts, vectors, macros, and  pat-
  1581.      terns.  Line drawings can be saved as vec-
  1582.      tors for later recall  at  any  angle  and
  1583.      scale using F6. Portions of the screen can
  1584.      be saved as  bitmapped  images  under  F7.
  1585.      Fonts  can be created and then saved using
  1586.      F7, as can patterns.  Entire  screens  are
  1587.      saved  with  F8,  while  key macros can be
  1588.      created for a wide variety  of  uses.  PC-
  1589.      KEY-DRAW  can  also save files as a BASICA
  1590.      subroutine.
  1591.  
  1592.      Vector  Saves  are  ideal   for   creating
  1593.      objects  that need to be retrieved at dif-
  1594.      ferent angles  and  sizes.  Possible  uses
  1595.      include    electrical   schematics,   flow
  1596.      charts, architectural  symbols  and  more.
  1597.      Each  element  is saved with its own name,
  1598.      providing easy recall of the  elements  by
  1599.      name.  Artists  could  use  this to create
  1600.      special  brush  patterns/shapes  to  paint
  1601.      with.  VCT  is the default extension. Cur-
  1602.      rently the only objects that can be  saved
  1603.      as vectors are those created entirely from
  1604.      lines,  dots,  parallel  lines,  or  spoke
  1605.      lines. On ending the line drawing with <F6
  1606.      E>nd the vector can be named and saved  to
  1607.      disk for later use. A vector file contains
  1608.      the x and  y  coordinates  of  the  object
  1609.      along  with  color  and width information.
  1610.      Previously created  vector  files  can  be
  1611.      loaded  with <F6 o>ld. The scale factor is
  1612.      matched to  that  of  the  drawing  unless
  1613.      forced  to  something  else.  The rotation
  1614.      angle can also be set.
  1615.  
  1616.                                   LIBRARIES 8-1
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.   Picture   Saves   are   used  for  complex
  1623.   objects. They are ideal for animation  and
  1624.   a  whole  lot  more.  One use is to create
  1625.   small  patterns  to  use  as  brushes  for
  1626.   painting with, but a more common use is to
  1627.   save parts of the screen for use in  other
  1628.   drawings. <F7 C>opy & save is used to copy
  1629.   an area from the screen  and  save  it  to
  1630.   disk.  PICtures  are  ideal for animation.
  1631.   PIC is the default extension. A FIG exten-
  1632.   sion can be specified which results in the
  1633.   file being saved as a series of ASCII num-
  1634.   bers.  The files can be retrieved with <F7
  1635.   o>ld or <F7 O>ld & place. <F7 o>ld  brings
  1636.   the  file  in  to  animate,  while  <F7 O>
  1637.   places it directly on the screen. To  view
  1638.   all  of the PIC files on the drawing disk,
  1639.   move to SCreen F7, select  <F8  O>ld,  and
  1640.   the files will be brought in one at a time
  1641.   and displayed in the upper left corner  of
  1642.   the screen.
  1643.  
  1644.   Font  Saves  provide  a  method  of saving
  1645.   small commonly used portions of a  screen,
  1646.   such as text, but not limited to text. The
  1647.   portions of the screen are  created  indi-
  1648.   vidually  and  saved  under a common file.
  1649.   They are retrieved with <F6  Alt-t>  based
  1650.   on  the  letter  assigned  to each picture
  1651.   when saved. FNT is the default  extension.
  1652.   To save a character use <F7 C>opy and name
  1653.   the file with an FNT extension.  You  will
  1654.   be  prompted for the character that corre-
  1655.   sponds to the one just copied.  To  ensure
  1656.   that  the  characters  line up properly be
  1657.   sure to be consistent with the location of
  1658.   the  top  of  the character. To modify the
  1659.   default letter  and  word  spacing  select
  1660.   <Space  Bar> when prompted for the charac-
  1661.   ter and enter the desired size in  pixels.
  1662.   TYPEMAKE.MCR  (on Library Disk #3) creates
  1663.   an unusual looking text font from the pri-
  1664.  
  1665.   LIBRARIES 8-2
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.      mary  text  fonts.  The  created  font  is
  1672.      readily available as KD-FONT3.FNT, but  it
  1673.      is  interesting to watch as it is created.
  1674.      Directions for TYPEMAKE.MCR are  contained
  1675.      in the file.
  1676.  
  1677.      Screen  Saves  can be used as a library by
  1678.      saving multiple pictures on one screen and
  1679.      then  recalled  using template of F8. This
  1680.      lets  you  group  commonly  used  pictures
  1681.      under  one  name and uses them as desired.
  1682.      Generally saving complete screens will  be
  1683.      the most commonly used storage method. SCN
  1684.      is the default extension. SCN files can be
  1685.      view  sequentially  for either SCreen 1 or
  1686.      SCreen 2 by selecting <F8 O>ld.
  1687.  
  1688.      Pattern Saves are in the same basic format
  1689.      as PICture saves, only arranged as 40 X 23
  1690.      blocks for  retrieval  using  the  pattern
  1691.      fill function of F5. Actually any PIC file
  1692.      can be used as  a  pattern  file.  Pattern
  1693.      files  can  be used for simple painting or
  1694.      definitive patterns used for  architecture
  1695.      or  cartography can be created. 64 differ-
  1696.      ent patterns can be  saved  in  one  file.
  1697.      The  <F1  Ctrl-z> screen size is identical
  1698.      to the pattern size. PIC  is  the  default
  1699.      extension.  PATMAKE.MCR  (on  Library Disk
  1700.      #2) will create  a  blank  pattern  screen
  1701.      with  a  grid  of  64  blocks  that can be
  1702.      replaced with the patterns you are  creat-
  1703.      ing.
  1704.  
  1705.      Macro Saves have many, many uses. See sec-
  1706.      tion on KEY MACRO for details as to  macro
  1707.      use. MCR is the default extension.
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.                                   LIBRARIES 8-3
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.   BASICA Saves are accomplished in much  the
  1721.   same  way  as  PICture  or  pattern  saves
  1722.   using <F7  C>,  except  that  when  a  BAS
  1723.   extension  is  added  to the file name the
  1724.   file is saved as a subroutine that can  be
  1725.   merged  into a BASICA program that you are
  1726.   writing. The file will always start a line
  1727.   number  20000 so you will have to RENUMber
  1728.   before merging several together. The  sub-
  1729.   routine  created  can  be  called and will
  1730.   load an array with the data  so  that  the
  1731.   array  can  be put on the screen using the
  1732.   PUT command of basic. This  is  ideal  for
  1733.   writing games or for writing programs with
  1734.   graphical interfaces. PUT is an ideal  way
  1735.   to  get  simple animation in a BASICA pro-
  1736.   gram. Any of  the  files  on  the  library
  1737.   disks  can  be  turned  into BASIC subrou-
  1738.   tines. See your BASICA manual  for  detail
  1739.   information  on  merging BASICA files, and
  1740.   using graphic commands, like PUT and GET.
  1741.  
  1742.   Creating Libraries: While  PC-KEY-DRAW  is
  1743.   ideal for creating libraries, it currently
  1744.   comes with a limited supply of  libraries.
  1745.   I  have  created many libraries for my own
  1746.   use, but they include things that would be
  1747.   of  little use to anyone else. Most of the
  1748.   libraries I have created relate to  motion
  1749.   compensated  cranes  and  there just isn't
  1750.   much call for such symbols. At the time of
  1751.   this  writing PC-KEY-DRAW includes twenty-
  1752.   six font libraries, seven pattern  librar-
  1753.   ies, and a number of macro libraries. I do
  1754.   not have the time or the talent to  create
  1755.   general purpose libraries, but some of you
  1756.   might. Please send any libraries that  you
  1757.   create  to me for evaluation. Unregistered
  1758.   users can receive credit towards register-
  1759.   ing,  while  registered  users can receive
  1760.   credit towards updates or CA$H back.  Yep,
  1761.   I  am willing to pay for good libraries in
  1762.  
  1763.   LIBRARIES 8-4
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.      any of  PC-KEY-DRAW's  formats,  including
  1770.      printer  configuration.  The  actual price
  1771.      will depend on the type, quality, and gen-
  1772.      eral  use  of the library. Please indicate
  1773.      what you think the library is worth.
  1774.  
  1775.      I reserve the right to withdraw this offer
  1776.      at  any time. Please send original librar-
  1777.      ies only and not copies of  other  program
  1778.      libraries.
  1779.  
  1780.      Library  Disks:  Several library disks are
  1781.      supplied  with  PC-KEY-DRAW.  The  library
  1782.      disks  contain  numerous  files saved with
  1783.      many  of  the  possible  save   techniques
  1784.      offered   by  PC-KEY-DRAW.  Library  files
  1785.      available   include   macros,    pictures,
  1786.      screens, fonts and patterns.
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.                                   LIBRARIES 8-5
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.      ──────────────────────────────────────────
  1819.  
  1820.      5 - PRINTING
  1821.      ──────────────────────────────────────────
  1822.  
  1823.      PC-KEY-DRAW currently provides three meth-
  1824.      ods  of  printing  graphics.  The  primary
  1825.      method a graphics printing is to perform a
  1826.      screen  dump  to a dot matrix printer that
  1827.      is Epson or IBM graphics  compatible.  The
  1828.      second  method is the zoom printing method
  1829.      which can be set up to  work  with  almost
  1830.      any  printer. See Appendix B: for informa-
  1831.      tion on configuring the program  for  your
  1832.      printer.  For those with an HP LaserJet or
  1833.      compatible a third printing method is pro-
  1834.      vided. Alternately, the user can use third
  1835.      party programs to  print  their  graphics.
  1836.      This  manual was printed with the aid of a
  1837.      commercial program called INSET.
  1838.  
  1839.      Screen Dump: The most common way to  print
  1840.      a  graphic  screen  is the use of a simple
  1841.      screen  dump.  The  key  to  performing  a
  1842.      screen  dump is the use of the DOS program
  1843.      GRAPHICS.COM that comes with all  versions
  1844.      of DOS. Run GRAPHICS as part of your AUTO-
  1845.      EXEC.BAT, as part of KD.BAT,  or  directly
  1846.      from  DOS. Depending on the version of DOS
  1847.      you are using, when GRAPHICS is run a mes-
  1848.      sage  may  or  may  not appear telling you
  1849.      that GRAPHICS is loaded.
  1850.  
  1851.      Most users should be  aware  that  hitting
  1852.      <Shft-PrtSc>  while  in a text screen will
  1853.      dump  a  copy  of  the  screen  to   their
  1854.      printer.  GRAPHICS.COM  extends this capa-
  1855.      bility to the graphics modes of  your  IBM
  1856.      PC.  While  in  PC-KEY-DRAW hitting <Shft-
  1857.      PrtSc> with GRAPHICS loaded  will  dump  a
  1858.      copy of the screen to the printer. This is
  1859.      a complete copy of  the  screen  including
  1860.  
  1861.                                    PRINTING 9-1
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.   the cursor, help  menu,  grid  and  prompt
  1868.   line.  Generally, it is desirable to print
  1869.   the picture and only the  picture.  <s>how
  1870.   can  be  used  to show only the picture on
  1871.   the screen, thus when  a  screen  dump  is
  1872.   invoked  the  print  out will contain only
  1873.   the desired information. PC-KEY-DRAW  pro-
  1874.   vides  a  more  direct  way of printing by
  1875.   selecting <F8 p>rint, which will allow you
  1876.   to change the 25th line and then print the
  1877.   picture and the picture only.  Essentially
  1878.   <F8 p> invokes a <Shft-PrtSc> so you don't
  1879.   have to.
  1880.  
  1881.   If the drawing covers more than  a  single
  1882.   screen,   each  screen  will  have  to  be
  1883.   printed individually and then put together
  1884.   manually.  A  reducing copy machine can be
  1885.   used to provide  single  sheet  size  from
  1886.   multiple  pages. Some users report success
  1887.   in  transferring  the  multiple  pages  to
  1888.   blueprints for use in architect and lands-
  1889.   cape design.
  1890.  
  1891.   A  screen  dump  will  behave  differently
  1892.   depending on the video mode the program is
  1893.   in. To print the screen  sideways  on  the
  1894.   paper, perform printing from the high res-
  1895.   olution mode. To print the  screen  across
  1896.   the  top  of  the  paper, perform printing
  1897.   from the medium resolution mode.
  1898.  
  1899.   GRAPHICS.COM from your DOS disk is not the
  1900.   only  screen dump program that can be used
  1901.   with PC-KEY-DRAW. Some printers come  with
  1902.   their own drivers, for example the Okidata
  1903.   color printer includes a screen dump  rou-
  1904.   tine   that  lets  you  print  PC-KEY-DRAW
  1905.   images  in  full  color.  There  are  also
  1906.   screen  dump programs in the public domain
  1907.   and  a  number  of   commercial   programs
  1908.   designed to replace GRAPHICS.COM.
  1909.  
  1910.   PRINTING 9-2
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.      Zoom  Printing: Banners and posters can be
  1917.      created on a dot matrix printer or even  a
  1918.      daisy  wheel printer using the zoom print-
  1919.      ing functions of  PC-KEY-DRAW.  There  are
  1920.      many  programs  design  to  print banners,
  1921.      but PC-KEY-DRAW is the only  one  designed
  1922.      to  print  posters.  The zoom printer uses
  1923.      text characters on the printer  to  repre-
  1924.      sent  the  colors  on  the screen, thus in
  1925.      medium  resolution  four  different   text
  1926.      characters  are used in printing, while in
  1927.      high resolution only  two  characters  are
  1928.      needed.  The  entire screen can be printed
  1929.      using <F8 P> or  just  a  portion  of  the
  1930.      screen  with  <F8  Ctrl-p>.  The user must
  1931.      specify the characters to use and the size
  1932.      of  the print out. Size 1 is the smallest,
  1933.      printing a single character at 15+CPI  for
  1934.      each  dot in the image to be printed. Size
  1935.      2 prints a single character at 12 CPI  for
  1936.      each dot. Size 3 uses 10 CPI to print each
  1937.      character.
  1938.  
  1939.      The higher numbers in zoom  printing  pro-
  1940.      vide  multiples  of the lower numbers. See
  1941.      Chapter 4 for a zoom printer sizing chart.
  1942.      A  number of zoom printer drivers are sup-
  1943.      plied on the program disk and  PC-KEY-DRAW
  1944.      provides the capability to create your own
  1945.      drivers for printers  not  supported.  See
  1946.      Appendix B: for configuration information.
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.                                    PRINTING 9-3
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.   LaserJet  Printing:  The   most   advanced
  1966.   printing   capability  of  PC-KEY-DRAW  is
  1967.   available  for  the  HP  LaserJet  or  any
  1968.   printer  that  emulates  the LaserJet. KD-
  1969.   LASER.EXE can be  use  to  print  multiple
  1970.   pages   or  to  combine  separate  screens
  1971.   together as one. KD-LASER allows the  user
  1972.   to specify the resolution to use, the por-
  1973.   tion of the screen to  print,  and  allows
  1974.   inverting  the  video.  To  print multiple
  1975.   pages created in the virtual page mode  of
  1976.   PC-KEY-DRAW  simply  specify the workspace
  1977.   drive where  the  PAGE  files  reside  and
  1978.   enter  PAGE  as  the name of the file. PC-
  1979.   KEY-DRAW's brochure was  created  in  this
  1980.   fashion.  Future  versions  of the program
  1981.   will expand the features  of  KD-LASER  to
  1982.   most dot matrix printers.
  1983.  
  1984.   Alternate  Printing: PC-KEY-DRAW can be an
  1985.   ideal tool for  creating  graphics  to  be
  1986.   printed  with other programs. The pictures
  1987.   in this manual were all created  with  PC-
  1988.   KEY-DRAW,  but  were  printed  with INSET.
  1989.   INSET allows graphics  to  be  mixed  with
  1990.   text  from  a  standard word processor. It
  1991.   sits in the background and allows graphics
  1992.   to  be  positioned and sized on the screen
  1993.   with the text while editing. It then takes
  1994.   over  when  printing  and inserts the pic-
  1995.   tures in text.
  1996.  
  1997.   Pictures created with PC-KEY-DRAW can also
  1998.   be  used  with  various desktop publishing
  1999.   programs, such as Ventura Publisher.  Cur-
  2000.   rently  the  screens must be captured with
  2001.   GEMCAP or translated with one of a  number
  2002.   of image file format translators available
  2003.   in  the  public  domain  or  commercially.
  2004.   Future  versions  of PC-KEY-DRAW will pro-
  2005.   vide direct read and write of IMG files.
  2006.  
  2007.  
  2008.   PRINTING 9-4
  2009.  
  2010.